<?php
namespace app\admin\controller;
use app\admin\common\Base;
use think\Db;
class System extends Base
{
    public function index()
    {
    	$info=Db::name('system')->where('id',1)->find();
    	$this->assign('info',$info);
        return $this->fetch();
    }

    public function save()
    {
    	$status=0;
        $msg="操作失败";
        $data = $this->request->param();
        $data['updatetime']=time();
        $res=Db::name('system')->where('id',1)->update($data);
        if($res){
        	adminlog('修改系统配置','修改');
        	$status=1;
        	$msg="修改成功";
        }
        return ['status'=>$status, 'msg'=> $msg];
    }


}
